package com.lyfei.yd.system.enums;

import lombok.Getter;

@Getter
public enum SysUserStatus {
    OK(1, "正常"), DISABLE(2, "停用"), DELETED(3, "删除");

    private final Integer code;

    private final String info;

    SysUserStatus(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public static SysUserStatus getByCode(Integer code){
        for(SysUserStatus userStatus : SysUserStatus.values()){
            if(userStatus.getCode().equals(code)){
                return userStatus;
            }
        }

        return null;
    }
}
